import Vue from 'vue'
import router from '../router'
import store from '../store'
export default{

    //封装工具
    mustBeLogin(){
        let token = localStorage.getItem('token')
        if(!token){
           Vue.prototype.$toast('请先登录')
           setTimeout(()=>{
            // store.
            // console.log(store['_mutations']['isGoBack/chanisGoBack'][0]);
            store['_mutations']['isGoBack/chanisGoBack'][0](true);
            router.push('/wode')
           },1000)
           return  false
        }
        return true
    }
  
}
